﻿<%@ Page Language="C#" AutoEventWireup="true"  MasterPageFile="~/GUI/AdminMaster.Master" CodeBehind="SystemAdministrator.aspx.cs" Inherits="wdss.GUI.SystemAdministrator" Title="System Administrator" %>
<asp:Content ContentPlaceHolderID="contentNew" ID="contentView" Visible="false" runat="server">
<style type="text/css">
.logheading
{
    text-align:center;
	font-family:Arial;
	font-style:normal;
	font-size:larger;
}

    .basicbox
    {
        height: 192px;
        width: 844px;
    }
    
    .newStyle2
    {
        font-size: 25px;
        font-weight: bold;
        color: #FFFFFF;
    }
    .newStyle6
    {
        font-family: "Arial Rounded MT Bold";
        font-size: xx-large;
        font-weight: bold;
        color: #FFFFFF;
    }
    
</style>
   <table align=center><tr><td>
    <asp:Label 
            ID="Label4" runat="server" CssClass="newStyle6" Text="Welcome System Admin..!"></asp:Label></td></tr></table>
        <br />
    <table align=center>
    <tr>
    <td>
    <asp:Button ID="fetchUsers_Button" runat="server" Text="Fetch New Users" onclick="fetchUsers_Button_Click"
     BackColor="#2A3137" BorderColor="#191E24" ForeColor="White" 
    BorderStyle="Groove" Font-Overline="False" Font-Underline="False"
     ToolTip="Fetch all the new users who have not been given access"
     Width="137px"   />
    </td>
    <td>
    <asp:Button ID="btn_allUsers" runat="server" onclick="btn_allUsers_Click" 
        Text="Fetch All Users" BackColor="#2A3137" BorderColor="#191E24" ForeColor="White" 
        BorderStyle="Groove" ToolTip="Fetch all the users of the system" 
        Width="137px" />
        </td>
        <td>
        <asp:Button ID="checkAll_Button" runat="server" Text="Check All" 
        onclick="checkAll_Button_Click" BackColor="#2A3137" BorderColor="#191E24" ForeColor="White"  
        BorderStyle="Groove" />
        </td>
<td>
        <asp:Button ID="uncheckAll_Button" runat="server" Text="Uncheck All" 
        onclick="uncheckAll_Button_Click" BackColor="#2A3137" BorderColor="#191E24" ForeColor="White" 
        BorderStyle="Groove" Width="114px"  />
    </td>
    <td>
    <asp:Button ID="denyAccess_Button" runat="server" 
        onclick="denyAccess_Button_Click" Text="Deny Access/Delete User" 
        BackColor="#2A3137" BorderColor="#2A3137" ForeColor="White"  BorderStyle="Groove" 
        ToolTip="Deny the access to the user and delete the account" Width="207px" 
             />
    </td>
    <td>
    <asp:Button ID="grantAccess_Button" runat="server" 
        onclick="grantAccess_Button_Click" Text="Grant Access" BackColor="#2A3137" 
            BorderColor="#191E24" ForeColor="White" 
         BorderStyle="Groove" 
        ToolTip="Grant user the requested access"  Width="125px" />
        </td></tr></table>
        <br />
        <br />
        <table align=center><tr><td>
    <asp:GridView ID="user_GridView" runat="server" AutoGenerateColumns="False" 
        BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" 
        CellPadding="3" ForeColor="Black" GridLines="Vertical"
        HorizontalAlign="Center" >
        <RowStyle BackColor="#CCCCCC" BorderColor="#333333" BorderStyle="Double" 
            ForeColor="White" />
        <Columns>
            <asp:BoundField DataField="user1_name" HeaderText="Username" />
            <asp:BoundField DataField="request" HeaderText="Request" />
            <asp:BoundField DataField="role_id" HeaderText="Role ID" />
            <asp:BoundField DataField="requested_position" HeaderText="Requested Position" />
            <asp:TemplateField HeaderText="Select">
                <ItemTemplate>
                <asp:CheckBox ID="userSelector_CheckBox" runat="server" />
                   
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#CCCCCC" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="#CCCCCC" />
    </asp:GridView>
    </td></tr></table>
    <br />
    <br />
     <asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="XX-Large" 
            ForeColor="#FFFFFF" Text="SYSTEM LOG"></asp:Label>
    
        
        
        
        <br />
    &nbsp;
        <br />
        <table align=center><tr><td>
        <asp:GridView ID="log_GridView" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" 
            CellPadding="3" DataSourceID="sql_log" ForeColor="Black" 
            HorizontalAlign="Center" ToolTip="System Log" GridLines="Vertical" 
            AllowPaging="True" Height="50px" Width="277px" AllowSorting="True">
            <RowStyle BackColor="Silver" BorderColor="#333333" BorderStyle="Double" 
                ForeColor="White" />
            <Columns>
                <asp:BoundField DataField="date" HeaderText="Date" SortExpression="date" />
                <asp:BoundField DataField="text" HeaderText="Text" SortExpression="text" />
            </Columns>
            <FooterStyle BackColor="#CCCCCC" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" 
                VerticalAlign="Middle" />
            <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
            <EditRowStyle HorizontalAlign="Center" VerticalAlign="Top" 
                Wrap="True" />
            <AlternatingRowStyle BackColor="#CCCCCC" BorderStyle="Outset" />
        </asp:GridView>
       </td></tr></table>
        &nbsp;
    
        <asp:SqlDataSource ID="sql_log" runat="server" 
          ConnectionString="<%$ ConnectionStrings:aspnetdbConnectionString %>"
            SelectCommand="sp_GetAllLogs" SelectCommandType="StoredProcedure" 
            ProviderName="System.Data.SqlClient" >
            
        </asp:SqlDataSource>   

</asp:Content>

